package copy;

import java.io.IOException;
import java.io.ObjectOutputStream;

public class MyObjectOutputStream extends ObjectOutputStream {
	private Integer index;

	protected MyObjectOutputStream() throws IOException, SecurityException {
		super();
	}
	
	protected void writeStreamHeader() throws IOException {
		  if (index==0) {
		   super.writeStreamHeader();
		   index++;
		  } else {
		   super.reset();
		   index++;
		  }
	}
	
	

}
